Guided Practice 7.2

Consider the computation of

(free-vars
  (make-app
    (make-lam
      'x
      (make-app
        'x
        (make-lam
          'y
          (make-app
            'x
            (make-app 'y 'z)))))
    (make-lam
      'y
      (make-app
        'u
        (make-lam
          'z
          (make-app
            'x
            (make-app 'y 'z)))))))

Which of the following will appear as calls to free-vars-in-subexp during this computation?

  1. (free-vars-in-subexp (make-app 'y 'z) (list 'z 'y))
  2. (free-vars-in-subexp (make-app 'y 'z) (list 'x 'y))
  3. (free-vars-in-subexp (make-app 'y 'z) (list 'y 'x))
  4. (free-vars-in-subexp (make-app 'y 'z) (list 'x 'z))

[ANSWER]


Last modified: Sat Oct 31 12:29:40 Eastern Daylight Time 2015